home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / Tool Chest / Development Platforms / MPW Related / MPW Interfaces / AIncludes / SysEqu.a < prev    next >
Encoding:
Text File  |  1993-09-17  |  53.9 KB  |  1,387 lines  |  [TEXT/MPS ]

  1. ;    File:        SysEqu.a
  2. ;
  3. ;    Copyright:    © 1983-1993 by Apple Computer, Inc.
  4. ;                All rights reserved.
  5. ;
  6. ;    Version:    System 7.1 for ETO #11
  7. ;    Created:    Tuesday, March 30, 1993 18:00
  8. ;
  9. ;___________________________________________________________________________
  10.  
  11.     IF &TYPE('__INCLUDINGSYSEQU__') = 'UNDEFINED' THEN
  12. __INCLUDINGSYSEQU__    SET    1
  13.  
  14.                   IF          (&TYPE('wholeSystem') = 'UNDEFINED') THEN
  15. wholeSystem       EQU         1
  16.                   ENDIF
  17.  
  18. ; ioFlags:
  19. noCacheBit        EQU             5                     ; disable cacheing for this operation  <S333/15Dec87>
  20. noCache            EQU          $20                 ; constant for noCacheBit   <S333/15Dec87>
  21.  
  22. PCDeskPat         EQU         $20B                      ; desktop pat, top bit only! others are in use
  23. HiKeyLast         EQU         $216                      ; Same as KbdVars
  24. KbdLast           EQU         $218                      ; Same as KbdVars+2
  25. ExpandMem         EQU         $2B6                      ; pointer to expanded memory block
  26.  
  27. ; Test Manager EQUs
  28. videoMagic        EQU         $5A932BC7                 ; When VideoInfoOk contains this value, the video card is ok (CritErr).
  29.  
  30. ; Unit table size constants (Used in startInit.a)
  31. unitEntries       EQU         64                        ; default # of entries in unit table
  32. maxUTEntries      EQU         unitEntries+64            ; Set Max higher so the table can grow.
  33. bgnSlotUnit       EQU         48                        ; default start unit number for slots.
  34. bgnSlotRef        EQU         -(bgnSlotUnit+1)          ; default start RefNum for slots.
  35.  
  36. ; Start Boot state constants.
  37. sbState0          EQU         0                         ; StartBoot code is at state-0.
  38. sbState1          EQU         1                         ; StartBoot code is at state-1.
  39.  
  40. ; system alarm
  41.  
  42. alrmFlEnable      EQU         0                         ; 1 => alarm clock mechanism is triggered
  43. ; Apple Desktop Bus
  44. JADBProc          EQU         1720                      ; (long) procedure called on ADBReInit
  45.  
  46. ; start at $C00
  47.  
  48. SCSIBase          EQU         $0C00                     ; (long) base address for SCSI chip read
  49. SCSI2Base          EQU         $1FF0                     ; (long) base address for 2nd SCSI chip            <?>
  50. SCSIDMA           EQU         $0C04                     ; (long) base address for SCSI DMA
  51. SCSIHsk           EQU         $0C08                     ; (long) base address for SCSI handshake
  52. SCSIGlobals       EQU         $0C0C                     ; (long) ptr for SCSI mgr locals
  53. RGBBlack          EQU         $0C10                     ; (6 bytes) the black field for color
  54. RGBWhite          EQU         $0C16                     ; (6 bytes) the white field for color
  55.  
  56. RowBits           EQU         $0C20                     ; (word) screen horizontal pixels
  57. ColLines          EQU         $0C22                     ; (word) screen vertical pixels
  58. ScreenBytes       EQU         $0C24                     ; (long) total screen bytes
  59.  
  60.  
  61. NMIFlag           EQU         $0C2C                     ; (byte) flag for NMI debounce
  62. VidType           EQU         $0C2D                     ; (byte) video board type ID
  63. ScrnInval        EQU            $0C2D                    ; (byte) replaces obscure VidType.  When $FFFF, scrn resource is
  64.                                                     ;        valid.  When cleared, scrn resource is invalid.
  65. VidMode           EQU         $0C2E                     ; (byte) video mode (4=4bit color)
  66. SCSIPoll          EQU         $0C2F                     ; (byte) poll for device zero only once.
  67.  
  68.  
  69. SEVarBase         EQU         $0C30                     ; ($0C30-0CB0) 128 bytes for sys err data
  70. ; note!!! - if changed, need to change also in hwequ file
  71.  
  72. MMUFlags          EQU         $0CB0                     ; (byte) cleared to zero (reserved for future use)
  73. MMUType           EQU         $0CB1                     ; (byte) kind of MMU present
  74. MMU32bit          EQU         $0CB2                     ; (byte) boolean reflecting current machine MMU mode
  75. MMUTbl            EQU         $0CB4                     ; (long) pointer to MMU Mapping table
  76. MMUTblSize        EQU         $0CB8                     ; (long) size of the 24 bit mode MMU mapping table
  77. MMU24Info         EQU         $0CB4                      ; (long) ptr to 24 bit mode MMU configuration info
  78. MMU32Info         EQU         $0CB8                     ; (long) ptr to 32 bit mode MMU configuration info
  79. SInfoPtr          EQU         $0CBC                     ; (long) pointer to Slot manager information
  80. ASCBase           EQU         $0CC0                     ; (long) pointer to Sound Chip
  81. SMGlobals         EQU         $0CC4                     ; (long) pointer to Sound Manager Globals
  82. TheGDevice        EQU         $0CC8                     ; (long) the current graphics device
  83. CQDGlobals        EQU         $0CCC                     ; (long) quickDraw global extensions
  84.  
  85. ; TEMPORARY EQUATE
  86. DeskCPat          EQU         $0CD8                     ; [PixPatHandle] Handle to desk pixPat
  87.  
  88. TimeVIADB         EQU         $0CEA                     ; (word) number of iter's of VIA access & DBRA.    <1.3>
  89. VIA2               EQU         $0CEC                     ; VIA2 base address [pointer]                    <2.7>
  90. RBV                EQU            VIA2                    ; RBV base address [pointer] share with VIA2    <2.7>
  91. VIA2RBV           EQU         VIA2                     ; VIA2 or RBV base address [pointer]            <1.3><2.7>
  92. OSS                EQU            VIA2                    ; OSS base address [pointer] share with VIA2    <2.7>
  93. VIA2RBVOSS       EQU         VIA2                     ; VIA2 or RBV or OSS base address [pointer]        <2.7>
  94. VISA            EQU            VIA2                    ; VISA base address [pointer]                    <11>
  95. V8                EQU            VIA2                    ; V8 base address [pointer]
  96.  
  97. WarmStart         EQU         $0CFC                     ; (long) flag to indicate it is a warm start
  98. wmStConst         EQU         $574C5343                 ; warm start constant
  99. sleepConst        EQU         'SARA'                    ; waking from sleep constant
  100. TimeDBRA          EQU         $0D00                     ; (word) number of iterations of DBRA per millisecond
  101. TimeSCCDB         EQU         $0D02                     ; (word) number of iter's of SCC access & DBRA.
  102.  
  103. PmgrBase          EQU         $0D18                      ; Lomem pointer to power manager vars
  104.  
  105. TableSeed         EQU         $0D20                     ; (long) seed value for color table ID's
  106. SRsrcTblPtr       EQU         $0D24                     ; (long) pointer to slot resource table.
  107. JVBLTask          EQU         $0D28                     ; vector to slot VBL task interrupt handler
  108. WMgrCPort         EQU         $0D2C                     ; window manager color port
  109. VertRRate         EQU         $0D30                     ; (word) Vertical refresh rate for start manager.
  110.  
  111. ChunkyDepth       EQU         $0D60                     ; depth of the pixels
  112. CrsrPtr           EQU         $0D62                     ; pointer to cursor save area
  113. PortList          EQU         $0D66                     ; list of grafports
  114. MickeyBytes       EQU         $0D6A                     ; long pointer to cursor stuff
  115. QDErr             EQU         $0D6E                     ; QuickDraw error code [word]
  116. VIA2DT            EQU         $0D70                     ; 32 bytes for VIA2 dispatch table for NuMac
  117.  
  118. SInitFlags        EQU         $0D90                     ; StartInit.a flags [word]
  119. DTQueue           EQU         $0D92                     ; (10 bytes) deferred task queue header
  120. DTQFlags          EQU         $0D92                     ; flag word for DTQueue
  121. DTskQHdr          EQU         $0D94                     ; ptr to head of queue
  122. DTskQTail         EQU         $0D98                     ; ptr to tail of queue
  123. JDTInstall        EQU         $0D9C                     ; (long) ptr to deferred task install routine
  124. HiliteRGB         EQU         $0DA0                     ; 6 bytes: rgb of hilite color
  125. DSCtrAdj          EQU         $0DA8                     ; (long) Center adjust for DS rect.
  126. IconTLAddr        EQU         $0DAC                     ; (long) pointer to where start icons are to be put.
  127. VideoInfoOK       EQU         $0DB0                     ; (long) Signals to CritErr that the Video card is ok
  128. EndSRTPtr         EQU         $0DB4                     ; (long) Pointer to the end of the Slot Resource Table (Not the SRT buffer).
  129. SDMJmpTblPtr      EQU         $0DB8                     ; (long) Pointer to the SDM jump table
  130. JSwapMMU          EQU         $0DBC                     ; (long) jump vector to SwapMMU routine
  131. SdmBusErr         EQU         $0DC0                     ; (long) Pointer to the SDM busErr handler
  132. LastTxGDevice     EQU         $0DC4                     ; (long) copy of TheGDevice set up for fast text measure
  133.  
  134. NewCrsrJTbl       EQU         $88C                      ; location of new crsr jump vectors
  135. NewCrsrJCnt       EQU         1                         ; 2 new vectors
  136. JAllocCrsr        EQU         $88C                      ; (long) vector to routine that allocates cursor
  137. JSetCCrsr         EQU         $890                      ; (long) vector to routine that sets color cursor
  138. JOpcodeProc       EQU         $894                      ; (long) vector to process new picture opcodes
  139. CRSRBASE          EQU         $898                      ; (long) scrnBase for cursor
  140. CrsrDevice        EQU         $89C                      ; (long) current cursor device
  141. SrcDevice         EQU         $8A0                      ; (LONG) Src device for Stretchbits
  142. MainDevice        EQU         $8A4                      ; (long) the main screen device
  143. DeviceList        EQU         $8A8                      ; (long) list of display devices
  144. CRSRROW           EQU         $8AC                      ; (word) rowbytes for current cursor screen
  145. QDColors          EQU         $8B0                      ; (long) handle to default colors
  146.  
  147. ; QuickDraw
  148.  
  149. HiliteMode        EQU         $938                      ; used for color highlighting
  150.  
  151.  
  152. ; Exception vectors
  153.  
  154. ResetSP            EQU            $00                ; reset initial interrupt SP                     <32> rb
  155. ResetPC            EQU            $04                ; reset initial Program counter                    <32> rb
  156. BusErrVct         EQU         $08               ; bus error vector
  157. AddrVector        EQU            $C                ; address error
  158. IlglVector        EQU            $10                ; illegal instruction
  159. ZeroVector        EQU            $14                ; divide by 0
  160. CheckVector        EQU            $18                ; check bounds error
  161. TrapVVector        EQU            $1C                ; trapv location
  162. PrivlgVector    EQU            $20                ; privilege violation
  163. TraceVector        EQU            $24                ; trace exception vector
  164. Line1010          EQU         $28               ; 1010 emulator trap (system routines)
  165. Line1111          EQU         $2C               ; 1111 emulator trap (reserved)
  166. DebugVector        EQU            Line1111        ; debug instructions
  167. FmtErrVect        EQU         $38               ; format error vector for 68010/68020
  168. BadIntVector    EQU            $60                ; spurious interrupt
  169. AutoInt1          EQU         $64               ; level 1 auto-vector
  170. AutoInt2          EQU         $68               ; level 2 auto-vector
  171. AutoInt3          EQU         $6C               ; level 3 auto-vector
  172. AutoInt4          EQU         $70               ; level 4 auto-vector
  173. AutoInt5          EQU         $74               ; level 5 auto-vector
  174. AutoInt6          EQU         $78               ; level 6 auto-vector
  175. AutoInt7          EQU         $7C               ; level 7 auto-vector
  176. BkptVector        EQU            $B8                ; break loc
  177. BSUNVector        EQU            $C0                ; BSUN for FP Emulation Code                        <32> rb
  178. UNFLVector        EQU            $CC                ; Underflow for FP Emulation Code                    <32> rb
  179. OPERRVector        EQU            $D0                ; Operand Error for FP Emulation Code                <32> rb
  180. OVFLVector        EQU            $D4                ; Overflow for FP Emulation Code                    <32> rb
  181. SNANVector        EQU            $D8                ; Signal NAN for FP Emulation Code                    <32> rb
  182. UNIMPDTVector    EQU            $DC                ; 040 Unimplemented Data Type for FP Emulation Code    <32> rb
  183.  
  184. ;-------------
  185. ; MMU Equates
  186. ;-------------
  187.  
  188. ; MMU Mode bits
  189. ;
  190. ; type MMU_Mode = (true32b,false32b)
  191.  
  192. false32b          EQU         0                         ; modified
  193. true32b           EQU         1
  194.  
  195. ;+ System Error Handler
  196.  
  197. RestProc          EQU         $A8C                      ; Resume procedure f InitDialogs [pointer]
  198.  
  199. ; equates for queue elements
  200.  
  201. sIQType           EQU         6                         ; slot interrupt queue element ID
  202.  
  203. ;Default Startup
  204.  
  205. ;DefaultRec offsets for set/get default startup
  206.  
  207. drDriveNum        EQU         0                         ; [INTEGER]
  208. drRefNum          EQU         2                         ; [INTEGER]
  209.  
  210. ; Deferred Task Queue Element
  211.  
  212. dtQType           EQU         7                         ; deferred task queue element ID
  213. inDTQ             EQU         6                         ; bit index for "in deferred task" flag
  214. dtLink            EQU         0                         ; Link to next element [pointer]
  215. dtType            EQU         4                         ; Unique ID for validity [word]
  216. dtFlags           EQU         6                         ; optional flags [word]
  217. dtAddr            EQU         8                         ; service routine [pointer]
  218. dtParm            EQU         $C                        ; optional A1 parameter [long]
  219. dtResrvd          EQU         $10                       ; reserved [long]
  220. dtQElSize         EQU         20                        ; length of DT queue element in bytes
  221.  
  222.  
  223. ; Topanga video mode for Esprit
  224. NTSC               EQU         $B3E                      ; A byte                        <v2.1>
  225.  
  226.  
  227. ;+ ROM Equates
  228.  
  229. ROM85             EQU         $28E                      ; (word) actually high bit - 0 for ROM vers $75 (sic) and later
  230. ROMMapHndl        EQU         $B06                      ; (long) handle of ROM resource map
  231.  
  232. ;+ Screen Equates
  233.  
  234. ScrVRes           EQU         $102                      ; screen vertical dots/inch [word]
  235. ScrHRes           EQU         $104                      ; screen horizontal dots/inch [word]
  236. ScrnBase          EQU         $824                      ; Screen Base [pointer]
  237. ScreenRow         EQU         $106                      ; rowBytes of screen [word]
  238.  
  239.  
  240. ; Mouse/Keyboard
  241.  
  242. MBTicks           EQU         $16E                      ; tick count @ last mouse button [long]
  243. JKybdTask         EQU         $21A                      ; keyboard VBL task hook [pointer]
  244. KeyLast           EQU         $184                      ; ASCII for last valid keycode [word]
  245. KeyTime           EQU         $186                      ; tickcount when KEYLAST was rec'd [long]
  246. KeyRepTime        EQU         $18A                      ; tickcount when key was last repeated [long]
  247.  
  248. ;+ Parameter RAM (a twenty byte copy of the real parameter ram).
  249.  
  250. SPConfig          EQU         $1FB                      ; config bits: 4-7 A, 0-3 B (see use type below)
  251. SPPortA           EQU         $1FC                      ; SCC port A configuration [word]
  252. SPPortB           EQU         $1FE                      ; SCC port B configuration [word]
  253.  
  254. ; SCC Serial Chip Addresses
  255.  
  256. SCCRd             EQU         $1D8                      ; SCC base read address [pointer]
  257. SCCWr             EQU         $1DC                      ; SCC base write address [pointer]
  258.  
  259. ; Serial port use type
  260.  
  261. useFree           EQU         0                         ; Use undefined
  262. useATalk          EQU         1                         ; AppleTalk
  263. useAsync          EQU         2                         ; Async
  264. useExtClk         EQU         3                         ; externally clocked
  265.  
  266. ; Unpacked, user versions of parameter ram
  267.  
  268. DoubleTime        EQU         $2F0                      ; double click ticks [long]
  269. CaretTime         EQU         $2F4                      ; caret blink ticks [long]
  270. KeyThresh         EQU         $18E                      ; threshold for key repeat [word]
  271. KeyRepThresh      EQU         $190                      ; key repeat speed [word]
  272. SdVolume          EQU         $260                      ; Global volume(sound) control [byte]
  273.  
  274.  
  275. ;+ System Clocks
  276.  
  277. Ticks             EQU         $16A                      ; Tick count, time since boot [long]
  278. Time              EQU         $20C                      ; clock time (extrapolated) [long]
  279.  
  280.  
  281. ;+ Cursor
  282.  
  283. iBeamCursor       EQU         1                         ; text selection cursor
  284. crossCursor       EQU         2                         ; for structured selection
  285. plusCursor        EQU         3                         ; for drawing graphics
  286. watchCursor       EQU         4                         ; for indicating a long delay
  287.  
  288.  
  289. ; result codes for Relstring call
  290.  
  291. sortsBefore       EQU         -1                        ; str1 < str2
  292. sortsEqual        EQU         0                         ; str1 = str2
  293. sortsAfter        EQU         1                         ; str1 > str2
  294.  
  295. ;+ Queue Package
  296.  
  297. qInUse            EQU         7                         ; queue-in-use flag bit
  298.  
  299. ; Header Record
  300.  
  301. qHeadSize         EQU         $A                        ; queue header size
  302. qFlags            EQU         0                         ; miscellaneous flags [word]
  303. qHead             EQU         2                         ; first element in queue [pointer]
  304. qTail             EQU         6                         ; last element in queue [pointer]
  305.  
  306. ; General Purpose Queue Element Definition
  307.  
  308. qLink             EQU         0                         ; link to next queue element [pointer]
  309. qType             EQU         4                         ; queue element type [word]
  310.  
  311.  
  312. ;+ Event Manager
  313.  
  314. evType            EQU         4                         ; event queue element is type 4
  315.  
  316. ; Event Type Numbers (in EvtNum)
  317.  
  318. everyEvent        EQU         -1
  319. nullEvt           EQU         0                         ; event 0 is the null event
  320. mButDwnEvt        EQU         1                         ; mouse button down is event 1
  321. mButUpEvt         EQU         2                         ; mouse button up is event 2
  322. keyDwnEvt         EQU         3                         ; key down is event 3
  323. keyUpEvt          EQU         4                         ; key up is event 4
  324. autoKeyEvt        EQU         5                         ; auto-repeated key is event 5
  325. updatEvt          EQU         6                         ; update event
  326. diskInsertEvt     EQU         7                         ; disk-inserted event
  327. activateEvt       EQU         8                         ; activate/deactive event
  328. osEvt            EQU            $F                        ; suspend/resume/mousemoved
  329. kHighLevelEvent    EQU            $17                        ; high-level event
  330.  
  331. ; Event Mask Equates
  332. ; (same constant names are masks rather than bit numbers in higher level languages.
  333. ; Only special one is highLevelEvtBit, since it has only indirect correspondence to
  334. ; kHighLevelEvent. 
  335.  
  336. highLevelEvtBit    EQU            $A                        ; for kHighLevelEvent
  337.  
  338. ; Event Message Equates
  339.  
  340. charCodeMask          EQU         $000000FF
  341. keyCodeMask           EQU         $0000FF00
  342. adbAddrMask           EQU         $00FF0000
  343. osEvtMessageMask       EQU         $FF000000
  344.  
  345. ; osEvt Messages.  Event (sub)code is in the high byte of the message field.
  346. mouseMovedMessage        EQU     $FA ;
  347. suspendResumeMessage    EQU     $01 ;
  348. resumeFlag                EQU     0    ; Bit 0 of message field indicates resume vs suspend }
  349. convertClipboardFlag    EQU     1    ; Bit 1 in resume message indicates clipboard change }
  350.  
  351. ; Modifier bits in event record
  352. ; (same constant names are masks rather than bit numbers in higher level languages.)
  353.  
  354. activeFlag        EQU         $0                        ; activate? (activateEvt and mouseDown)
  355. btnState          EQU         $7                        ; state of button?
  356. cmdKey            EQU         $8                        ; command key down?
  357. shiftKey          EQU         $9                        ; shift key down?
  358. alphaLock         EQU         $A                        ; alpha lock down?
  359. optionKey         EQU         $B                        ; option key down?
  360. controlKey        EQU         $C                        ; control key down?
  361.  
  362. ; Event Record Definition
  363.  
  364. evtNum            EQU         0                         ; event code [word]
  365. evtMessage        EQU         2                         ; event message [long]
  366. evtTicks          EQU         6                         ; ticks since startup [long]
  367. evtMouse          EQU         $A                        ; mouse location [long]
  368. evtMeta           EQU         $E                        ; state of modifier keys [byte]
  369. evtMBut           EQU         $F                        ; state of mouse button [byte]
  370. evtBlkSize        EQU         $10                       ; size in bytes of the event record
  371. MonkeyLives       EQU         $100                      ; monkey lives if >= 0 [word]
  372. SEvtEnb           EQU         $15C                      ; enable SysEvent calls from GNE [byte]
  373. JournalFlag       EQU         $8DE                      ; journaling state [word]
  374. JournalRef        EQU         $8E8                      ; Journalling driver's refnum [word]
  375.  
  376. ; Obsolete Event Manager Equates
  377.  
  378. netWorkEvt        EQU         $A                        ; network event
  379. ioDrvrEvt         EQU         $B                        ; driver-defined event
  380. app1Evt           EQU         $C                        ; application defined events
  381. app2Evt           EQU         $D
  382. app3Evt           EQU         $E
  383. app4Evt           EQU         $F
  384.  
  385. ;+ Memory Manager
  386.  
  387. ; Master pointer bits for handles - USE _HLock, _HPurge, etc. for portability
  388.  
  389. lock              EQU         7                         ; lock bit in a master pointer
  390. purge             EQU         6                         ; bit for purgeable/unpurgeable
  391. resource          EQU         5                         ; bit to flag a resource handle
  392.  
  393.  
  394. BufPtr            EQU         $10C                      ; top of application memory [pointer]
  395. StkLowPt          EQU         $110                      ; Lowest stack as measured in VBL task [pointer]
  396. TheZone           EQU         $118                      ; current heap zone [pointer]
  397. ApplLimit         EQU         $130                      ; application limit [pointer]
  398. SysZone           EQU         $2A6                      ; system heap zone [pointer]
  399. ApplZone          EQU         $2AA                      ; application heap zone [pointer]
  400. HeapEnd           EQU         $114                      ; end of heap [pointer]
  401. HiHeapMark        EQU         $BAE                      ; (long) highest address used by a zone below sp
  402. MemErr            EQU         $220                      ; last memory manager error [word]
  403. maxSize           EQU         $800000                   ; outrageously large memory mgr request
  404. dfltStackSize     EQU         $00002000                 ; 8K size for stack
  405. mnStackSize       EQU         $00000400                 ; 1K minimum size for stack
  406.  
  407. ; _InitZone argument table.
  408.  
  409. startPtr          EQU         0                         ; Start address for zone [pointer]
  410. limitPtr          EQU         4                         ; Limit address for zone [pointer]
  411. cMoreMasters      EQU         8                         ; Number of masters to allocate at time [word]
  412. pGrowZone         EQU         10                        ; growZone procedure [pointer]
  413.  
  414. ; Control/Status Call Codes
  415.  
  416. killCode          EQU         1                         ; KillIO code
  417. drvStsCode        EQU         8                         ; status call code for drive status
  418. ejectCode         EQU         7                         ; control call eject code
  419. tgBuffCode        EQU         8                         ; set tag buffer code
  420.  
  421. ; Driver flags, (Bit definitions for DCtlFlags byte)
  422.  
  423. dReadEnable       EQU         0                         ; enabled for read operations
  424. dWritEnable       EQU         1                         ; enabled for writing
  425. dCtlEnable        EQU         2                         ; enabled for control operations
  426. dStatEnable       EQU         3                         ; enabled for status operations
  427. dNeedGoodBye      EQU         4                         ; needs a "goodbye kiss"
  428. dNeedTime         EQU         5                         ; needs "main thread" time
  429. dNeedLock         EQU         6                         ; needs to be accessed at interrupt level
  430.  
  431. ; Run-Time flags, (Bit definitions for DCtlFlags+1 byte)
  432.  
  433. dOpened           EQU         5                         ; bit to mark driver 'Open'
  434. dRAMBased         EQU         6                         ; 1=RAM-based Driver, 0=ROM-based
  435. drvrActive        EQU         7                         ; bit to mark the driver active
  436.  
  437. ; Drive queue element offsets
  438.  
  439. dQDrive           EQU         $6                        ; drive number [word]
  440. dQRefNum          EQU         $8                        ; driver refnum [word]
  441. dQFSID            EQU         $A                        ; file system handling this drive [word]
  442. dQDrvSz           EQU         $C                        ; number of blocks this drive [word]
  443. dQDrvSz2          EQU         $E                        ; if qType = 1, high word of drive size
  444.  
  445. ; Queue Element Type Definitions
  446.  
  447. ioQType           EQU         2                         ; I/O queue element is type 2
  448. drvQType          EQU         3                         ; timer queue element is type 3
  449. fsQType           EQU         5                         ; File System VCB element
  450. slpQType        EQU            $10                        ; Sleep queue element is type 16        <v1.2>
  451. btQType            EQU            21                        ; B*Tree Manager
  452.  
  453. ; Device Control Entry Definition
  454. ;dCtlEntrySize used to be only 40 bytes!
  455.  
  456. dCtlEntrySize     EQU         $34                       ; length of a DCE [52 bytes]
  457. dCtlDriver        EQU         0                         ; driver [handle]
  458. dCtlFlags         EQU         4                         ; flags [word]
  459. dCtlQueue         EQU         6                         ; queue header
  460. dCtlQHead         EQU         8                         ; queue first-element [pointer]
  461. dCtlQTail         EQU         $C                        ; queue last-element [pointer]
  462. dCtlPosition      EQU         $10                       ; position [long]
  463. dCtlStorage       EQU         $14                       ; driver's private storage [handle]
  464. dCtlRefNum        EQU         $18                       ; refNum of this driver [word]
  465. dCtlCurTicks      EQU         $1A                       ; counter for timing systemTask calls [long]
  466. dCtlWindow        EQU         $1E                       ; driver's window (if any) [pointer]
  467. dCtlDelay         EQU         $22                       ; number of ticks between sysTask calls [word]
  468. dCtlEMask         EQU         $24                       ; desk accessory event mask [word]
  469. dCtlMenu          EQU         $26                       ; menu ID associated with driver [word]
  470. dCtlSlot          EQU         $28                       ; device slot Number [byte]
  471. dCtlSlotId        EQU         $29                       ; device Id within slot [byte]
  472. dCtlDevBase       EQU         $2A                       ; driver scratch ptr/offset from base to device [long]
  473. dCtlOwner         EQU         $2E                       ; ptr to task control block(ownership) [Ptr]
  474. dCtlExtDev        EQU         $32                       ; Id of external device [byte]
  475.  
  476.  
  477. ; Driver Globals
  478.  
  479. UTableBase        EQU         $11C                      ; unit I/O table [pointer]
  480. UnitNtryCnt       EQU         $1D2                      ; count of entries in unit table [word]
  481. JFetch            EQU         $8F4                      ; fetch a byte routine for drivers [pointer]
  482. JStash            EQU         $8F8                      ; stash a byte routine for drivers [pointer]
  483. JIODone           EQU         $8FC                      ; IODone entry location [pointer]
  484.  
  485. ;Chooser
  486.  
  487. chooserID         EQU         1                         ; caller value for the chooser
  488.  
  489. ;+ I/O System
  490.  
  491. ; File positioning modes for ioPosMode field of I/O record
  492.  
  493. fsAtMark          EQU         0                         ; at current position of mark
  494. fsFromStart       EQU         1                         ; offset relative to beginning of file
  495. fsFromLEOF        EQU         2                         ; offset relative to logical end-of-file
  496. fsFromMark        EQU         3                         ; offset relative to current mark
  497. rdVerify          EQU         $40                       ; read verify mode
  498.  
  499. ; Permission values for ioPermssn field of I/O record
  500.  
  501. fsCurPerm         EQU         0                         ; whatever is currently allowed
  502. fsRdPerm          EQU         1                         ; request to read only
  503. fsWrPerm          EQU         2                         ; request to write only
  504. fsRdWrPerm        EQU         3                         ; request to read and write
  505. fsRdWrShPerm      EQU         4                         ; request for shared read and write
  506.  
  507. ; I/O record (general fields with trap-specific ones listed below)
  508.  
  509. ioQElSize         EQU         $32                       ; length of I/O parameter block [50 bytes]
  510. ioLink            EQU         $0                        ; queue link in header [pointer]
  511. ioType            EQU         $4                        ; type for safety check [byte]
  512. ioTrap            EQU         $6                        ; the trap [word]
  513. ioCmdAddr         EQU         $8                        ; address to dispatch to [pointer]
  514. ioCompletion      EQU         $C                        ; completion routine [pointer]
  515. ioResult          EQU         $10                       ; I/O result code [word]
  516. ioFileName        EQU         $12                       ; file name pointer [pointer]
  517. ioVRefNum         EQU         $16                       ; volume refnum [word]
  518. ioDrvNum          EQU         $16                       ; drive number [word]
  519. ioRefNum          EQU         $18                       ; file reference number [word]
  520. ioFileType        EQU         $1A                       ; specified along with FileName [byte]
  521.  
  522. ; specific fields for _Read, _Write
  523.  
  524. ioBuffer          EQU         $20                       ; data buffer [pointer]
  525. ioByteCount       EQU         $24                       ; requested byte count [long]
  526. ioNumDone         EQU         $28                       ; actual byte count completed [long]
  527. ioPosMode         EQU         $2C                       ; initial file positioning mode/eol char [word]
  528. ioPosOffset       EQU         $2E                       ; file position offset [long]
  529.  
  530. ; specific fields for _Allocate
  531.  
  532. ioReqCount        EQU         $24                       ; requested new size [long]
  533. ioActCount        EQU         $28                       ; actual byte count allocated [long]
  534.  
  535. ; specific fields for _Open
  536.  
  537. ioPermssn         EQU         $1B                       ; permissions [byte]
  538. ioOwnBuf          EQU         $1C                       ; "private" 522-byte buffer [pointer]
  539.  
  540. ; specific fields for _Rename
  541.  
  542. ioNewName         EQU         $1C                       ; new name pointer [pointer]
  543.  
  544. ; specific fields for _GetFileInfo, _SetFileInfo
  545.  
  546. ioFQElSize        EQU         $50                       ; File command parameter length [80 bytes]
  547. ioFDirIndex       EQU         $1C                       ; directory index of file [word]
  548. ioFlAttrib        EQU         $1E                       ; in-use bit=7, lock bit=0 [byte]
  549. ioFFlType         EQU         $1F                       ; file type [byte]
  550. ioFlUsrWds        EQU         $20                       ; finder info [16 bytes]
  551. ioFFlNum          EQU         $30                       ; file number [long]
  552. ioFlStBlk         EQU         $34                       ; start file block (0000 if none) [word]
  553. ioFlLgLen         EQU         $36                       ; logical length (EOF) [long]
  554. ioFlPyLen         EQU         $3A                       ; physical length in bytes [long]
  555. ioFlRStBlk        EQU         $3E                       ; resource fork's start file block [word]
  556. ioFlRLgLen        EQU         $40                       ; resource fork's logical length (EOF) [long]
  557. ioFlRPyLen        EQU         $44                       ; resource fork's physical length [long]
  558. ioFlCrDat         EQU         $48                       ; creation date & time [long]
  559. ioFlMdDat         EQU         $4C                       ; last modification date & time [long]
  560.  
  561. ; Specific fields for _GetEOF, _SetEOF
  562.  
  563. ioLEOF            EQU         $1C                       ; logical end-of-file [long]
  564.  
  565. ; Specific fields for _SetFileType
  566.  
  567. ioNewType         EQU         $1C                       ; new type byte [byte]
  568.  
  569. ; Specific fields for _GetVolInfo, _GetVolume, _SetVolume, _MountVol, _UnmountVol,
  570. ; _Eject. Note that these traps have a bigger record size.
  571.  
  572. ioVQElSize        EQU         $40                       ; Volume command parameter length [64 bytes]
  573. ioVDrvNum         EQU         $16                       ; drive or volume number [word]
  574. ioVNPtr           EQU         $12                       ; name buffer (or zero) [pointer]
  575. ioVolIndex        EQU         $1C                       ; volume index number [word]
  576. ioVCrDate         EQU         $1E                       ; creation date & time [long]
  577. ioVLsBkUp         EQU         $22                       ; last backup date & time [long]
  578. ioVAtrb           EQU         $26                       ; Volume attributes [word]
  579. ioVNmFls          EQU         $28                       ; # files in directory [word]
  580. ioVDirSt          EQU         $2A                       ; start block of file dir [word]
  581. ioVBlLn           EQU         $2C                       ; length of dir in blocks [word]
  582. ioVNmAlBlks       EQU         $2E                       ; num blks (of alloc size) this dev [word]
  583. ioVAlBlkSiz       EQU         $30                       ; alloc blk byte size [long]
  584. ioVClpSiz         EQU         $34                       ; bytes to try to allocate at a time [long]
  585. ioAlBlSt          EQU         $38                       ; starting block in block map [word]
  586. ioVNxtFNum        EQU         $3A                       ; next free file number [long]
  587. ioVFrBlk          EQU         $3E                       ; # free alloc blks for this vol [word]
  588.  
  589. ; Catalog structure equates:
  590.  
  591. fsRtParID         EQU         1                         ; DirID of parent's root
  592. fsRtDirID         EQU         2                         ; Root DirID
  593. fsXTCNID          EQU         3                         ; Extent B*-Tree file ID
  594. fsCTCNID          EQU         4                         ; Catalog B*-Tree file ID
  595. fsBBCNID        EQU            5                        ; Bad Block "file" ID
  596. fsUsrCNID         EQU         $10                       ; First assignable user CNode ID
  597.  
  598. ; Additional equates for all calls:
  599.  
  600. ioDirID           EQU         $30                       ; directory ID
  601. ioHQElSize        EQU            $34                        ; size of a standard HFS call queue element
  602.  
  603. ; Additional equates for catalog information return:
  604.  
  605. ioFlBkDat         EQU         $50                       ; File's last backup date
  606. ioFlxFndrInfo     EQU         $54                       ; File's additional finder info bytes
  607. ioFlParID         EQU         $64                       ; File's parent directory ID
  608. ioFlClpSiz        EQU         $68                       ; File's clump size, in bytes
  609.  
  610. ; Additional equates for directory information return:
  611.  
  612. ioDirFlg          EQU         4                         ; Bit in ioFlAttrb set to indicate directory
  613. ioDrUsrWds        EQU         $20                       ; Directory's user info bytes
  614. ioDrDirID         EQU         $30                       ; Directory ID
  615. ioDrNmFls         EQU         $34                       ; Number of files in a directory
  616. ioDrCrDat         EQU         $48                       ; Directory creation date
  617. ioDrMdDat         EQU         $4C                       ; Directory modification date
  618. ioDrBkDat         EQU         $50                       ; Directory backup date
  619. ioDrFndrInfo      EQU         $54                       ; Directory finder info bytes
  620. ioDrParID         EQU         $64                       ; Directory's parent directory ID
  621. ioHFQElSiz        EQU         $6C                       ; Size of a Hierarchical File Queue Element
  622.  
  623. ; Additional equates for _TFGetVolInfo:
  624.  
  625. ioVLsMod          EQU         $22                       ; Last modification date
  626. ioVSigWord        EQU         $40                       ; Volume signature
  627. ioVCBVBMst        EQU         $2A
  628. ioVNxtCNID        EQU         $3A
  629. ioVDrvInfo        EQU         $42                       ; Drive number (0 if volume is offline)
  630. ioVDRefNum        EQU         $44                       ; Driver refNum
  631. ioVFSID           EQU         $46                       ; ID of file system handling this volume
  632. ioVBkup           EQU         $48                       ; Last backup date (0 if never backed up)
  633. ioVSeqNum         EQU         $4C                       ; Sequence number of this volume in volume set
  634. ioVWrCnt          EQU         $4E                       ; Volume write count
  635. ioVFilCnt         EQU         $52                       ; Total number of files on volume
  636. ioVDirCnt         EQU         $56                       ; Total number of directories on the volume
  637. ioVFndrInfo       EQU         $5A                       ; Finder information for volume
  638. ioHVQElSize       EQU         $7A                       ; Length of Hierarchical Volume information PB
  639.  
  640. ; fields for _GetFCBInfo:
  641.  
  642. ioFCBIndx         EQU         $1C                       ; FCB index for _GetFCBInfo
  643. ioFCBFiller1      EQU         $1E                       ; filler
  644. ioFCBFlNm         EQU         $20                       ; File number
  645. ioFCBFlags        EQU         $24                       ; FCB flags
  646. ioFCBStBlk        EQU         $26                       ; File start block
  647. ioFCBEOF          EQU         $28                       ; Logical end-of-file
  648. ioFCBPLen         EQU         $2C                       ; Physical end-of-file
  649. ioFCBCrPs         EQU         $30                       ; Current file position
  650. ioFCBVRefNum      EQU         $34                       ; Volume refNum
  651. ioFCBClpSiz       EQU         $36                       ; File clump size
  652. ioFCBParID        EQU         $3A                       ; Parent directory ID
  653. ioFCBQElSize      EQU         $3E                       ; extended size of FCBPBRec
  654.  
  655. ; fields for _GetWDInfo:
  656.  
  657. ioWDIndex         EQU         $1A                       ; Working Directory index for _GetWDInfo
  658. ioWDProcID        EQU         $1C                       ; WD's ProcID (long)
  659. ioWDVRefNum       EQU         $20                       ; WD's Volume RefNum (word)
  660. ioWDDirID         EQU         $30                       ; WD's DirID (long)
  661.  
  662. ; fields for _FSControl call:
  663.  
  664. ioFSVrsn          EQU         $20                       ; File system version
  665.  
  666. ; field for CatMove
  667.  
  668. ioNewDirID        EQU         $24                       ; destination directory for CatMove
  669.  
  670. ; fields for GetLogInInfo
  671.  
  672. ioObjNamePtr    EQU            $1C                        ; pointer to buffer for name of log-in
  673.  
  674. ; fields for GetDirAccess and SetDirAccess
  675.  
  676. ioACOwnerID        EQU            $24                        ; owner field of parameter block
  677. ioACGroupID        EQU            $28                        ; group field of parameter block
  678. ioACAccess        EQU            $2C                        ; access privileges
  679.  
  680. ; values of user IDs and group IDs
  681.  
  682. noUser            EQU            0                        ; no user
  683. administratorUser    EQU        1                        ; administrator’s user number
  684. noGroup            EQU            0                        ; no group
  685.  
  686. ; values of access privileges
  687.  
  688. fullPrivileges    EQU            $00070007                ; all privileges for everybody and owner
  689. ownerPrivileges EQU            $00000007                ; all privileges for owner only
  690.                 
  691. ; Specific fields for CatSearch
  692.  
  693. ioMatchPtr        EQU        $18                    ; match buffer pointer
  694. ioReqMatchCount EQU        $1C                    ; maximum match count
  695. ioActMatchCount EQU        $20                    ; actual match count
  696. ioSearchBits    EQU        $24                    ; search criteria selector
  697. ioSearchInfo1    EQU        $28                    ; search values and range lower bounds
  698. ioSearchInfo2    EQU        $2C                    ; search values and range upper bounds
  699. ioSearchTime    EQU        $30                    ; length of time to run search
  700. ioCatPosition    EQU        $34                    ; catalog position information
  701. ioOptBuffer        EQU        $44                    ; optional read buffer
  702. ioOptBufSize    EQU        $48                    ; length of optional read buffer
  703.  
  704. ; Specific fields for FileID calls
  705.  
  706. ioNamePtr         EQU        $12                    ; name ptr of file 
  707. ioDestNamePtr    EQU        $1C                 ; name ptr of destination file (FIDExchangeFiles only)
  708. ioDestDirID        EQU        $24                    ; directory id of destination file (FIDExchangeFiles only)
  709. ioSrcDirID      EQU        $30                    ; directory id of file specified. 
  710. ioFileID        EQU        $36                    ; file id of file
  711.  
  712. ; Specific fields for Get/SetForeignPrivs
  713. ioForeignPrivInfo1    EQU        $2C
  714. ioForeignPrivInfo2    EQU        $30
  715. ioForeignPrivInfo3    EQU        $34
  716. ioForeignPrivInfo4    EQU        $38
  717.  
  718. ; specific fields for MakeFSSpec
  719. ioFSSpecPtr            EQU        $1C
  720.  
  721. ; Specific fields for device _Open
  722.  
  723. ioMix             EQU         $1C                       ; General purpose field imported by driver[long]
  724. ioFlags           EQU         $20                       ; General purpose flags [word]
  725. ioSlot            EQU         $22                       ; Slot [byte]
  726. ioId              EQU         $23                       ; Id [byte]
  727. ioSEBlkPtr        EQU         $22                       ; Pointer to the seBlock [long]
  728.  
  729. ; ioFlags:
  730. fMulti            EQU         $00                       ; b0 = fMulti: ioSEBlkPtr is valid (ioSlot, ioId are invalid)
  731.  
  732. ; Specific fields for _Control, _Status
  733.  
  734. csCode            EQU         $1A                       ; control/status code [word]
  735. csParam           EQU         $1C                       ; operation-defined parameters [22 bytes]
  736.  
  737. ; FInfo (Finder Information) record layout
  738.  
  739. fdType            EQU         $0                        ; type of file [long]
  740. fdCreator         EQU         $4                        ; file's creator [long]
  741. fdFlags           EQU         $8                        ; flags [word]
  742. fdLocation        EQU         $A                        ; file's location [point]
  743. fdFldr            EQU         $E                        ; file's window [word]
  744.  
  745. ; added for HFS
  746.  
  747. ; FXInfo record layout
  748.  
  749. fdIconID          EQU         $0                        ; Icon ID [word]
  750. fdUnused          EQU         $2                        ; unused but reserved [3 words]
  751. fdScript        EQU            $8                        ; script flag and number [byte]
  752. fdXFlags        EQU            $9                        ; more flags bits [byte]
  753. fdComment         EQU         $A                        ; Comment ID [word]
  754. fdPutAway         EQU         $C                        ; Home Dir ID [2 words]
  755.  
  756. ; DInfo record layout
  757.  
  758. frRect            EQU         $0                        ; Folder Rect [4 words]
  759. frFlags           EQU         $8                        ; Flags [word]
  760. frLocation        EQU         $A                        ; Location [2 words]
  761. frView            EQU         $E                        ; Folder view [word]
  762.  
  763. ; DXInfo record layout
  764.  
  765. frScroll          EQU         $0                        ; scroll position [2 words]
  766. frOpenChain       EQU         $4                        ; dirID chain of open folders [2 words]
  767. frScript        EQU            $8                        ; script flag and number [byte]
  768. frXFlags        EQU            $9                        ; more flags bits [byte]
  769. frComment         EQU         $A                        ; comment [word]
  770. frPutAway         EQU         $C                        ; Dir ID [2 words]
  771.  
  772. ;end of addition
  773.  
  774. ; Masks for fdFlags field of FInfo record defined above
  775.  
  776. fOnDesk           EQU         1
  777. fHasBundle        EQU         8192                      ; set if file has a bundle
  778. fInvisible        EQU         16384                     ; set if file's icon is invisible
  779. fTrash            EQU         -3                        ; file is in Trash window
  780. fDeskTop          EQU         -2                        ; file is on desktop
  781. fDisk             EQU         0                         ; file is in disk window
  782.  
  783. ; File System Globals
  784.  
  785. DrvQHdr           EQU         $308                      ; queue header of drives in system [10 bytes]
  786. BootDrive         EQU         $210                      ; drive number of boot drive [word]
  787. EjectNotify       EQU         $338                      ; eject notify procedure [pointer]
  788. IAZNotify         EQU         $33C                      ; world swaps notify procedure [pointer]
  789. SFSaveDisk        EQU         $214                      ; last vRefNum seen by standard file [word]
  790. CurDirStore       EQU         46+$36A                   ; save dir across calls to Standard File [long]
  791.  
  792.  
  793. ;+ Date-Time record (for use with _Secs2Date, and _Date2Secs)
  794.  
  795. DateTimeRec     RECORD        0                        ; moved here from ScriptEqu.a <04/23/89 pke>
  796. year            DS.W        1
  797. month            DS.W        1
  798. day             DS.W        1
  799. hour            DS.W        1
  800. minute            DS.W        1
  801. second            DS.W        1
  802. dayOfWeek        DS.W        1
  803. DateTimeRecSize    EQU            *
  804. size            EQU            *
  805.                 ENDR
  806.  
  807. dtYear            EQU         $0                        ; year (1904..) [word]
  808. dtMonth           EQU         $2                        ; month (1..12) [word]
  809. dtDay             EQU         $4                        ; day (1..31) [word]
  810. dtHour            EQU         $6                        ; hour (0..23) [word]
  811. dtMinute          EQU         $8                        ; minute (0..59) [word]
  812. dtSecond          EQU         $A                        ; second (0..59) [word]
  813. dtDayOfWeek       EQU         $C                        ; day of week, sunday..saturday (1..7) [word]
  814.  
  815.  
  816. ;+ Miscellaneous stuff
  817.  
  818. OneOne            EQU         $A02                      ; constant $00010001 [long]
  819. MinusOne          EQU         $A06                      ; constant $FFFFFFFF [long]
  820. Lo3Bytes          EQU         $31A                      ; constant $00FFFFFF [long]
  821. ROMBase           EQU         $2AE                      ; ROM base address [pointer]
  822. RAMBase           EQU         $2B2                      ; RAM base address [pointer]
  823. SysVersion        EQU         $15A                      ; version # of RAM-based system [word]
  824. RndSeed           EQU         $156                      ; random seed/number [long]
  825.  
  826. ; fields for _GetDefaultStartup: [DefStartRec]
  827. ; SlotDev:
  828. sdExtDevID        EQU         $0                        ; [byte]
  829. sdPartition       EQU         $1                        ; [byte]
  830. sdSlotNum         EQU         $2                        ; [byte]
  831. sdSRsrcID         EQU         $3                        ; [byte]
  832. ; SCSIDev:
  833. sdReserved1       EQU         $0                        ; [byte]
  834. sdReserved2       EQU         $1                        ; [byte]
  835. sdRefNum          EQU         $2                        ; [word]
  836.  
  837. ; fields for _GetVideoDefault: [DefVideoRec]
  838.  
  839. sdSlot            EQU         $0                        ; [byte]
  840. sdSResource       EQU         $1                        ; [byte]
  841.  
  842. ; fields for _GetOSDefault: [DefOSRec]
  843.  
  844. sdReserved        EQU         $0                        ; [byte]
  845. sdOSType          EQU         $1                        ; [byte]
  846.  
  847.  
  848. ;+ Machine Name Resource
  849. nameRsrcID        EQU            -16395                    ; STR# rsrc in System file containing
  850.                                                     ; machine names.
  851.  
  852. ;+ SysEnvirons info
  853.  
  854.  
  855. SysEnvRec         RECORD      0
  856. environsVersion DS.W        1
  857. machineType       DS.W        1
  858. systemVersion     DS.W        1
  859. processor         DS.W        1
  860. hasFPU            DS.B        1
  861. hasColorQD        DS.B        1
  862. keyBoardType      DS.W        1
  863. atDrvrVersNum     DS.W        1
  864. sysVRefNum        DS.W        1
  865.                   ALIGN       2
  866. sysEnv1Size       EQU         *-SysEnvRec               ; size for version 1
  867. size            EQU            *
  868.                   ENDR
  869.  
  870. curSysEnvVers     EQU         2                         ; latest SysEnvirons version
  871.  
  872. ; return values
  873.  
  874. envXL             EQU         -2                        ; for the glue (double sigh)
  875. envMac            EQU         -1                        ; for the glue (sigh)
  876. envMachUnknown    EQU         0
  877. env512KE          EQU         1
  878. envMacPlus        EQU         2
  879. envSE             EQU         3
  880. envMacII          EQU         4
  881. envMacIIx          EQU         5
  882. envMacIIcx         EQU         6
  883. envSE30           EQU         7
  884. envPortable        EQU            8
  885. envMacIIci        EQU            9
  886. envMacIIfx        EQU            11
  887.  
  888. envCPUUnknown     EQU         0                         ; CPU types
  889. env68000          EQU         1
  890. env68010          EQU         2
  891. env68020          EQU         3
  892. env68030          EQU         4
  893. env68040        EQU            5                        ; <4.8>
  894.  
  895. envUnknownKbd     EQU         0                         ; Keyboard types
  896. envMacKbd         EQU         1
  897. envMacAndPad      EQU         2
  898. envMacPlusKbd     EQU         3
  899. envAExtendKbd     EQU         4
  900. envStandADBKbd    EQU         5
  901. envPrtblADBKbd    EQU            6                        ; <4.9>
  902. envPrtblISOKbd    EQU            7
  903. envStdISOADBKbd    EQU            8
  904. envExtISOADBKbd    EQU            9
  905.  
  906.  
  907. ;+ Scratch Areas
  908.  
  909. Scratch20         EQU         $1E4                      ; scratch [20 bytes]
  910. Scratch8          EQU         $9FA                      ; scratch [8 bytes]
  911.  
  912.  
  913. ;+ Scrap Manager
  914.  
  915. ScrapSize         EQU         $960                      ; scrap length [long]
  916. ScrapHandle       EQU         $964                      ; memory scrap [handle]
  917. ScrapCount        EQU         $968                      ; validation byte [word]
  918. ScrapState        EQU         $96A                      ; scrap state [word]
  919. ScrapName         EQU         $96C                      ; pointer to scrap name [pointer]
  920.  
  921.  
  922. ;+ Desk Accessories
  923.  
  924.  
  925. ; Message Definitions (in CSCode of control call)
  926.  
  927. accEvent          EQU         $40                       ; event message from SystemEvent
  928. accRun            EQU         $41                       ; run message from SystemTask
  929. accCursor         EQU         $42                       ; cursor message from SystemTask
  930. accMenu           EQU         $43                       ; menu message from SystemMenu
  931. accUndo           EQU         $44                       ; undo message from SystemEdit
  932. accCut            EQU         $46                       ; cut message from SystemEdit
  933. accCopy           EQU         $47                       ; copy message from SystemEdit
  934. accPaste          EQU         $48                       ; paste message from SystemEdit
  935. accClear          EQU         $49                       ; clear message from SystemEdit
  936. goodBye           EQU         -1                        ; goodbye message
  937.  
  938.  
  939.                   IF          wholeSystem=1 THEN
  940.  
  941. ;International stuff
  942.  
  943. IntlSpec          EQU         $BA0                      ; (long) - ptr to extra Intl data
  944.  
  945. ;Switcher
  946.  
  947. SwitcherTPtr      EQU         $286                      ; Switcher's switch table
  948.  
  949. ; Trap bits for memory manager
  950.  
  951. tSysOrCurZone     EQU         10                        ; bit set implies System Zone
  952. ; bit clear implies Current Zone
  953. clearBit          EQU         9                         ; bit set means clear allocated memory.
  954.  
  955.  
  956. ; Peripheral chips and Magic Hardware addresses
  957.  
  958. CPUFlag           EQU         $12F                      ; $00=68000, $01=68010, $02=68020 (old ROM inits to $00)
  959. cpu68000        EQU            0
  960. cpu68010        EQU            1
  961. cpu68020        EQU            2
  962. cpu68030        EQU            3
  963. cpu68040        EQU            4
  964.  
  965. ; VIA (6522) interface chip
  966.  
  967. VIA               EQU         $1D4                      ; VIA base address [pointer]
  968.  
  969. ; Disk Address
  970.  
  971. IWM               EQU         $1E0                      ; IWM base address [pointer]
  972.  
  973.  
  974. ; Interrupt secondary vectors
  975.  
  976. Lvl1DT            EQU         $192                      ; Interrupt level 1 dispatch table [32 bytes]
  977. Lvl2DT            EQU         $1B2                      ; Interrupt level 2 dispatch table [32 bytes]
  978. ExtStsDT          EQU         $2BE                      ; SCC ext/sts secondary dispatch table [16 bytes]
  979.  
  980.  
  981.  
  982. ; Parameter Ram
  983.  
  984. SPValid           EQU         $1F8                      ; validation field ($A7) [byte]
  985. SPATalkA          EQU         $1F9                      ; AppleTalk node number hint for port A
  986. SPATalkB          EQU         $1FA                      ; AppleTalk node number hint for port B
  987. SPAlarm           EQU         $200                      ; alarm time [long]
  988. SPFont            EQU         $204                      ; default application font number minus 1 [word]
  989. SPKbd             EQU         $206                      ; kbd repeat thresh in 4/60ths [2 4-bit]
  990. SPPrint           EQU         $207                      ; print stuff [byte]
  991. SPVolCtl          EQU         $208                      ; volume control [byte]
  992. SPClikCaret       EQU         $209                      ; double click/caret time in 4/60ths[2 4-bit]
  993. SPMisc1           EQU         $20A                      ; miscellaneous [1 byte]
  994. SPMisc2           EQU         $20B                      ; miscellaneous [1 byte]
  995. GetParam          EQU         $1E4                      ; system parameter scratch [20 bytes]
  996. SysParam          EQU         $1F8                      ; system parameter memory [20 bytes]
  997.  
  998. ; Cursor
  999.  
  1000. CrsrThresh        EQU         $8EC                      ; delta threshold for mouse scaling [word]
  1001. JCrsrTask         EQU         $8EE                      ; address of CrsrVBLTask [long]
  1002. MTemp             EQU         $828                      ; Low-level interrupt mouse location [long]
  1003. RawMouse          EQU         $82C                      ; un-jerked mouse coordinates [long]
  1004. CrsrRect          EQU         $83C                      ; Cursor hit rectangle [8 bytes]
  1005. TheCrsr           EQU         $844                      ; Cursor data, mask & hotspot [68 bytes]
  1006. CrsrAddr          EQU         $888                      ; Address of data under cursor [long]
  1007. CrsrSave          EQU         $88C                      ; data under the cursor [64 bytes]
  1008. CrsrVis           EQU         $8CC                      ; Cursor visible? [byte]
  1009. CrsrBusy          EQU         $8CD                      ; Cursor locked out? [byte]
  1010. CrsrNew           EQU         $8CE                      ; Cursor changed? [byte]
  1011. CrsrState         EQU         $8D0                      ; Cursor nesting level [word]
  1012. CrsrObscure       EQU         $8D2                      ; Cursor obscure semaphore [byte]
  1013.  
  1014. ; Mouse/Keyboard
  1015.  
  1016. KbdVars           EQU         $216                      ; Keyboard manager variables [4 bytes]
  1017. KbdType           EQU         $21E                      ; keyboard model number [byte]
  1018. MBState           EQU         $172                      ; current mouse button state [byte]
  1019. KeyMap            EQU         $174                      ; bitmap of the keyboard [2 longs]
  1020. KeypadMap         EQU         $17C                      ; bitmap for numeric pad-18bits [long]
  1021. Key1Trans         EQU         $29E                      ; keyboard translator procedure [pointer]
  1022. Key2Trans         EQU         $2A2                      ; numeric keypad translator procedure [pointer]
  1023. JGNEFilter        EQU         $29A                      ; GetNextEvent filter proc [pointer]
  1024. KeyMVars          EQU         $B04                      ; (word) for ROM KEYM proc state
  1025. Mouse             EQU         $830                      ; processed mouse coordinate [long]
  1026. CrsrPin           EQU         $834                      ; cursor pinning rectangle [8 bytes]
  1027. CrsrCouple        EQU         $8CF                      ; cursor coupled to mouse? [byte]
  1028. CrsrScale         EQU         $8D3                      ; cursor scaled? [byte]
  1029. MouseMask         EQU         $8D6                      ; V-H mask for ANDing with mouse [long]
  1030. MouseOffset       EQU         $8DA                      ; V-H offset for adding after ANDing [long]
  1031.  
  1032. ; System Clocks
  1033.  
  1034. AlarmState        EQU         $21F                      ; Bit7=parity, Bit6=beeped, Bit0=enable [byte]
  1035.  
  1036.  
  1037. ;+ Vertical Blanking Interrupt Handler
  1038.  
  1039. ; VBL Block Queue Element
  1040.  
  1041. vType             EQU         1                         ; VBL queue element is type 1
  1042. inVbl             EQU         6                         ; bit index for "in VBL" flag
  1043. vblink            EQU         0                         ; Link to next element [pointer]
  1044. vblType           EQU         4                         ; Unique ID for validity [word]
  1045. vblAddr           EQU         6                         ; service routine [pointer]
  1046. vblCount          EQU         $A                        ; timeout count [word]
  1047. vblPhase          EQU         $C                        ; phase count [word]
  1048. VBLQueue          EQU         $160                      ; VBL queue header [10 bytes]
  1049.  
  1050. ; Event manager
  1051.  
  1052. jPlayCtl          EQU         16                        ; playBack call
  1053. jRecordCtl        EQU         17                        ; record call
  1054. jcTickCount       EQU         0                         ; journal code for TickCount
  1055. jcGetMouse        EQU         1                         ; journal code for GetMouse
  1056. jcButton          EQU         2                         ; journal code for Button
  1057. jcGetKeys         EQU         3                         ; journal code for GetKeys
  1058. jcEvent           EQU         4                         ; journal code for GetNextEvent(Avail)
  1059. SysEvtMask        EQU         $144                      ; system event mask [word]
  1060. SysEvtBuf         EQU         $146                      ; system event queue element buffer [pointer]
  1061. EventQueue        EQU         $14A                      ; event queue header [10 bytes]
  1062. EvtBufCnt         EQU         $154                      ; max number of events in SysEvtBuf - 1 [word]
  1063.  
  1064. ; Event Queue Element Data Stucture
  1065.  
  1066. evtQWhat          EQU         6                         ; event code [word]
  1067. evtQMessage       EQU         8                         ; event message [long]
  1068. evtQWhen          EQU         $C                        ; ticks since startup [long]
  1069. evtQWhere         EQU         $10                       ; mouse location [long]
  1070. evtQMeta          EQU         $14                       ; state of modifier keys [byte]
  1071. evtQMBut          EQU         $15                       ; state of mouse button [byte]
  1072. evtQBlkSize       EQU         $16                       ; size of event record counting queue info
  1073.  
  1074. ; flags in flags field in heapzone header
  1075.  
  1076. fOnCheck          EQU         0                         ; Turn On Checking
  1077. fChecking         EQU         1                         ; Checking on
  1078. fNSelCompct       EQU         4                         ; Use non-selective compact algorithm when 1.
  1079. fNoRvrAlloc       EQU         5                         ; Don't use rover allocation scheme when 1.
  1080. fNSelPurge        EQU         6                         ; Use non-selective purge algorithm when 1.
  1081. fRelAtEnd         EQU         7                         ; MakeBk packs rels at end of free bk when 1.
  1082. ROZ               EQU         $0                        ; bit in flags field of MemMgr zone header
  1083.  
  1084. ; Block Types
  1085.  
  1086. tybkMask          EQU         3                         ; Mask for block type
  1087. tybkFree          EQU         0                         ; Free Block
  1088. tybkNRel          EQU         1                         ; Non-Relocatable
  1089. tybkRel           EQU         2                         ; Relocatable
  1090.  
  1091. ; Block Offsets
  1092.  
  1093. tagBC             EQU         0                         ; Tag and Byte Count field [long]
  1094. handle            EQU         4                         ; back pointer to master pointer [pointer]
  1095. blkData           EQU         8                         ; data starts here
  1096.  
  1097. ; Heap Zone header
  1098.  
  1099. bkLim             EQU         $0                        ; last block in zone [pointer]
  1100. purgePtr          EQU         $4                        ; roving purge placeholder [pointer]
  1101. hFstFree          EQU         $8                        ; first free handle [pointer]
  1102. zcbFree           EQU         $C                        ; # of free bytes in zone [long]
  1103. gzProc            EQU         $10                       ; grow zone procedure [pointer]
  1104. mAllocCnt         EQU         $14                       ; # of master ptrs to allocate [word]
  1105. flags             EQU         $16                       ; Flags [word]
  1106. cntRel            EQU         $18                       ; # of allocated relocatable blocks [word]
  1107. maxRel            EQU         $1A                       ; max # of allocated rel. blocks [word]
  1108. cntNRel           EQU         $1C                       ; # of allocated non-rel. blocks [word]
  1109. maxNRel           EQU         $1E                       ; max # of allocated non-rel. blocks [word]
  1110. cntEmpty          EQU         $20                       ; # of empty handles [word]
  1111. cntHandles        EQU         $22                       ; total # of handles [word]
  1112. minCBFree         EQU         $24                       ; min # of bytes free [long]
  1113. purgeProc         EQU         $28                       ; purge warning procedure [pointer]
  1114. allocPtr          EQU         $30                       ; roving allocator [pointer]
  1115. heapData          EQU         $34                       ; start of heap zone data
  1116.  
  1117.  
  1118.  
  1119. GZRootHnd         EQU         $328                      ; root handle for GrowZone [handle]
  1120. GZRootPtr         EQU         $32C                      ; root pointer for GrowZone [pointer]
  1121. GZMoveHnd         EQU         $330                      ; moving handle for GrowZone [handle]
  1122. MemTop            EQU         $108                      ; top of memory [pointer]
  1123. MmInOK            EQU         $12E                      ; initial memory mgr checks ok? [byte]
  1124. HpChk             EQU         $316                      ; heap check RAM code [pointer]
  1125. MaskBC            EQU         $31A                      ; Memory Manager Byte Count Mask [long]
  1126. MaskHandle        EQU         $31A                      ; Memory Manager Handle Mask [long]
  1127. MaskPtr           EQU         $31A                      ; Memory Manager Pointer Mask [long]
  1128. MinStack          EQU         $31E                      ; min stack size used in InitApplZone [long]
  1129. DefltStack        EQU         $322                      ; default size of stack [long]
  1130. MMDefFlags        EQU         $326                      ; default zone flags [word]
  1131.  
  1132. ;+ System Error Handler
  1133.  
  1134. DSAlertTab        EQU         $2BA                      ; system error alerts [pointer]
  1135. DSAlertRect       EQU         $3F8                      ; rectangle for disk-switch alert [8 bytes]
  1136. DSDrawProc        EQU         $334                      ; alternate syserror draw procedure [pointer]
  1137. DSWndUpdate       EQU         $15D                      ; GNE not to paintBehind DS AlertRect? [byte]
  1138. WWExist           EQU         $8F2                      ; window manager initialized? [byte]
  1139. QDExist           EQU         $8F3                      ; quickdraw is initialized [byte]
  1140. ResumeProc        EQU         $A8C                      ; Resume procedure from InitDialogs [pointer]
  1141. DSErrCode         EQU         $AF0                      ; last system error alert ID
  1142.  
  1143. ;+ Drivers
  1144.  
  1145. dskRfN            EQU         $FFFB                     ; 3.5" disk reference number
  1146. IntFlag           EQU         $15F                      ; reduce interrupt disable time when bit 7 = 0
  1147.  
  1148. ; Serial I/O Driver
  1149.  
  1150. SerialVars        EQU         $2D0                      ; async driver variables [16 bytes]
  1151. ABusVars          EQU         $2D8                      ; Pointer to AppleTalk local variables
  1152. ABusDCE           EQU         $2DC                      ; Pointer to AppleTalk DCE
  1153. PortAUse          EQU         $290                      ; bit 7: 1 = not in use, 0 = in use
  1154. ; bits 0-3: current use of port (see use type)
  1155. ; bits 4-6: user specific
  1156. PortBUse          EQU         $291                      ; port B use, same format as PortAUse
  1157. SCCASts           EQU         $2CE                      ; SCC read reg 0 last ext/sts rupt - A [byte]
  1158. SCCBSts           EQU         $2CF                      ; SCC read reg 0 last ext/sts rupt - B [byte]
  1159.  
  1160. ; Serial handshake record definition
  1161.  
  1162. shFXOn            EQU         $0                        ; XOn/XOff output control flags [byte]
  1163. shFCTS            EQU         $1                        ; CTS hardware handshake flag [byte]
  1164. shXOn             EQU         $2                        ; XOn character [byte]
  1165. shXOff            EQU         $3                        ; XOff character [byte]
  1166. shErrs            EQU         $4                        ; errors that cause abort [byte]
  1167. shEvts            EQU         $5                        ; status changes that cause events [byte]
  1168. shFInX            EQU         $6                        ; XOn/XOff input flow control flag [byte]
  1169. shNull            EQU         $7                        ; not used [byte]
  1170.  
  1171. ; Serial status record definition
  1172.  
  1173. ssCumErrs         EQU         $0                        ; cumulative errors [byte]
  1174. ssXOffSent        EQU         $1                        ; XOff sent as input control flag [byte]
  1175. ssRdPend          EQU         $2                        ; read pending flag [byte]
  1176. ssWrPend          EQU         $3                        ; write pending flag [byte]
  1177. ssCTSHold         EQU         $4                        ; CTS flow control hold flag [byte]
  1178. ssXOffHold        EQU         $5                        ; XOff received as output flow control [byte]
  1179.  
  1180. ; Disk Driver
  1181.  
  1182. ; Driver Code Header (for I/O drivers, desk accessories)
  1183.  
  1184. drvrFlags         EQU         $0                        ; various flags and permissions [word]
  1185. drvrDelay         EQU         $2                        ; # of ticks between systask calls [word]
  1186. drvrEMask         EQU         $4                        ; event mask [word]
  1187. drvrMenu          EQU         $6                        ; driver menu ID [word]
  1188. drvrOpen          EQU         $8                        ; open routine offset [word]
  1189. drvrPrime         EQU         $A                        ; prime routine offset [word]
  1190. drvrCtl           EQU         $C                        ; control routine offset [word]
  1191. drvrStatus        EQU         $E                        ; status routine offset [word]
  1192. drvrClose         EQU         $10                       ; warmstart reset routine offset [word]
  1193. drvrName          EQU         $12                       ; length byte and name of driver [string]
  1194. ;drvrVersion EQU ??? ; Driver w/ highest version # installed [word]
  1195. ; This field's offset varies depending upon the length
  1196. ; of the Name field preceding it. It must be word aligned!
  1197.  
  1198. ; Driver Status record definition
  1199.  
  1200. dsTrack           EQU         $0                        ; current track [word]
  1201. dsWriteProt       EQU         $2                        ; bit 7=1 if volume locked [byte]
  1202. dsDiskInPlace     EQU         $3                        ; disk in place [byte]
  1203. dsInstalled       EQU         $4                        ; drive installed [byte]
  1204. dsSides           EQU         $5                        ; bit 7=0 if single-sided drive [byte]
  1205. dsQLink           EQU         $6                        ; next queue entry [pointer]
  1206. dsDQVers          EQU         $A                        ; 1 for HD20 [word]
  1207. dsDQDrive         EQU         $C                        ; drive number [word]
  1208. dsDQRefNum        EQU         $E                        ; driver reference number [word]
  1209. dsDQFSID          EQU         $10                       ; file-system identifier [word]
  1210. dsTwoSideFmt      EQU         $12                       ; -1 if two-sided disk [byte]
  1211. dsDiskErrs        EQU         $14                       ; error count [word]
  1212. dsDrvSize         EQU         $12                       ; drive block size low word [word]
  1213. dsDrvS1           EQU         $14                       ; drive block size high word [word]
  1214. dsDrvType         EQU         $16                       ; 1 for HD20 [word]
  1215. dsDrvManf         EQU         $18                       ; 1 for Apple Computer, Inc [word]
  1216. dsDrvChar         EQU         $1A                       ; 230 ($E6) for HD20 [word]
  1217. dsDrvMisc         EQU         $1C                       ; 0 -- reserved [byte]
  1218.  
  1219.  
  1220. DskErr            EQU         $142                      ; disk routine result code [word]
  1221. PWMBuf2           EQU         $312                      ; PWM buffer 1 (or 2 if sound) [pointer]
  1222.  
  1223. ; Drive command codes
  1224.  
  1225. dcRead            EQU         0
  1226. dcWrite           EQU         1
  1227. dcStatus          EQU         3
  1228. dcInit            EQU         25
  1229. dcScan            EQU         26
  1230.  
  1231. ; Sound Stuff
  1232.  
  1233. SoundPtr          EQU         $262                      ; 4VE sound definition table [pointer]
  1234. SoundBase         EQU         $266                      ; sound bitMap [pointer]
  1235. SoundVBL          EQU         $26A                      ; vertical retrace control element [16 bytes]
  1236. SoundDCE          EQU         $27A                      ; sound driver DCE [pointer]
  1237. SoundActive       EQU         $27E                      ; sound is active? [byte]
  1238. SoundLevel        EQU         $27F                      ; current level in buffer [byte]
  1239. CurPitch          EQU         $280                      ; current pitch value [word]
  1240.  
  1241. ; I/O System
  1242.  
  1243. noQueueBit        EQU         $9                        ; tells I/O system not to queue the request
  1244. asyncTrpBit       EQU         $A                        ; bit in high byte of trap specifying async
  1245. ToExtFS           EQU         $3F2                      ; hook for external file systems
  1246.  
  1247. ; File System Globals
  1248.  
  1249. DskVerify         EQU         $12C                      ; used by 3.5 disk driver for read/verify [byte]
  1250. TagData           EQU         $2FA                      ; sector tag info for disk drivers [14 bytes]
  1251. BufTgFNum         EQU         $2FC                      ; file number [long]
  1252. BufTgFFlg         EQU         $300                      ; flags [word]
  1253. BufTgFBkNum       EQU         $302                      ; logical block number [word]
  1254. BufTgDate         EQU         $304                      ; time stamp [word]
  1255.  
  1256. ; I/O Command Equates for I/O Queue Elements (match trap numbers)
  1257.  
  1258. aRdCmd            EQU         2                         ; read command
  1259. aWrCmd            EQU         3                         ; write command
  1260. aCtlCmd           EQU         4                         ; control command
  1261. aStsCmd           EQU         5                         ; status command
  1262.  
  1263. ; fields for _SetPMSP call: PMSP = "Poor Man's Search Path"
  1264.  
  1265. ioPMSPFlg         EQU         $1A                       ; Flag whether to enable the PMSP
  1266. ioPMSPHook        EQU         $1C                       ; Pointer to PMSP hook proc
  1267.  
  1268. ; Print variables
  1269.  
  1270. ScrDmpEnb         EQU         $2F8                      ; screen dump enabled? [byte]
  1271. ScrDmpType        EQU         $2F9                      ; FF dumps screen, FE dumps front window [byte]
  1272.  
  1273. ; Scrap Variables
  1274.  
  1275. ScrapVars         EQU         $960                      ; scrap manager variables [32 bytes]
  1276. ScrapInfo         EQU         $960                      ; scrap length [long]
  1277. ScrapEnd          EQU         $980                      ; end of scrap vars
  1278. ScrapTag          EQU         $970                      ; scrap file name [STRING[15]]
  1279.  
  1280. ; Segment Loader
  1281.  
  1282. LaunchFlag        EQU         $902                      ; from launch or chain [byte]
  1283. SaveSegHandle     EQU         $930                      ; seg 0 handle [handle]
  1284. CurJTOffset       EQU         $934                      ; current jump table offset [word]
  1285. CurPageOption     EQU         $936                      ; current page 2 configuration [word]
  1286. LoaderPBlock      EQU         $93A                      ; param block for ExitToShell [10 bytes]
  1287. CurApRefNum       EQU         $900                      ; refNum of application's resFile [word]
  1288. CurrentA5         EQU         $904                      ; current value of A5 [pointer]
  1289. CurStackBase      EQU         $908                      ; current stack base [pointer]
  1290. CurApName         EQU         $910                      ; name of application [STRING[31]]
  1291. LoadTrap          EQU         $12D                      ; trap before launch? [byte]
  1292. SegHiEnable       EQU         $BB2                      ; (byte) 0 to disable MoveHHi in LoadSeg
  1293.  
  1294. ;device manager - Chooser message values
  1295.  
  1296. newSelMsg         EQU         12                        ; a new selection has been made
  1297. fillListMsg       EQU         13                        ; fill the list with choices to be made
  1298. getSelMsg         EQU         14                        ; mark one or more choices as selcted
  1299. selectMsg         EQU         15                        ; a choice has actually been made
  1300. deselectMsg       EQU         16                        ; a choice has been canceled
  1301. terminateMsg      EQU         17                        ; lets device package clean up
  1302. buttonMsg         EQU         19                        ; a button has been clicked
  1303. psAlert           EQU         6                         ; page setup alert bit in HiliteMode
  1304. theChooser        EQU         1
  1305.  
  1306. ; cdev message types
  1307. initDev           EQU         0                         ; Time for cdev to initialize itself
  1308. hitDev            EQU         1                         ; Hit on one of my items
  1309. closeDev          EQU         2                         ; Close yourself
  1310. nulDev            EQU         3                         ; Null event
  1311. updateDev         EQU         4                         ; Update event
  1312. activDev          EQU         5                         ; Activate event
  1313. deactivDev        EQU         6                         ; Deactivate event
  1314. keyEvtDev         EQU         7                         ; Key down/auto key
  1315. macDev            EQU         8                         ; Decide whether or not to show up
  1316. undoDev            EQU            9                        ; Edit menu undo  (cmd-z).
  1317. cutDev            EQU            10                        ; Edit menu cut   (cmd-x).
  1318. copyDev            EQU            11                        ; Edit menu copy  (cmd-c).
  1319. pasteDev        EQU            12                        ; Edit menu paste (cmd-v).
  1320. clearDev        EQU            13                        ; Edit menu clear.
  1321. cursorDev        EQU            14                        ; Cursor panel area.
  1322.  
  1323. ; Monitors control panel messages
  1324. initMsg            EQU            1                        ; initialization
  1325. okMsg            EQU            2                        ; user clicked OK button
  1326. cancelMsg        EQU            3                        ; user clicked Cancel button
  1327. hitMsg            EQU            4                        ; user clicked control in Options dialog
  1328. nulMsg            EQU            5                        ; periodic event
  1329. updateMsg        EQU            6                        ; update event
  1330. activateMsg        EQU            7                        ; not used
  1331. deactivateMsg    EQU            8                        ; not used
  1332. keyEvtMsg        EQU            9                        ; keyboard event
  1333. superMsg        EQU            10                        ; show superuser controls
  1334. normalMsg        EQU            11                        ; show only normal controls
  1335. startupMsg        EQU            12                        ; code has been loaded
  1336.  
  1337. ; cdev error codes
  1338. cdevGenErr        EQU         -1                        ; General error; gray cdev w/o alert
  1339. cdevMemErr        EQU         0                         ; Memory shortfall; alert user please
  1340. cdevResErr        EQU         1                         ; Couldn't get a needed resource; alert
  1341. cdevUnset         EQU         3                         ; cdevValue is initialized to this
  1342. ;___________________________________________________________________________
  1343. ;
  1344. ; Background Notification Manager
  1345.  
  1346. BNMQHd            EQU         $B60                      ; head of background notification Q
  1347.  
  1348. ;___________________________________________________________________________
  1349. ;
  1350. ; Communications Toolbox Globals Pointer
  1351.  
  1352. CommToolboxGlobals    EQU         $BB4                  ; [long] pointer to CTB Globals <8>
  1353.  
  1354.  
  1355. ;___________________________________________________________________________
  1356. ; Memory Manager
  1357.  
  1358. defaultPhysicalEntryCount EQU    8            ; default number of physical blocks in table
  1359.  
  1360. ; values returned from the GetPageState function
  1361.  
  1362. kPageInMemory          EQU            0
  1363. kPageOnDisk            EQU            1
  1364. kNotPaged              EQU            2
  1365.  
  1366. MemoryBlock            RECORD        0
  1367. address                DS.L        1            ; start of block
  1368. count                DS.L        1            ; size of block
  1369. size                EQU            *            ; size of MemoryBlock
  1370.                     ENDR
  1371.  
  1372. LogicalToPhysicalTable RECORD    0
  1373. logical                DS.B        MemoryBlock    ; logical block
  1374. physical            EQU            *            ; equivalent physical blocks
  1375. size                EQU            *            ; minimum size of table
  1376. defaultSize            EQU            size + (MemoryBlock.size * defaultPhysicalEntryCount)
  1377.                     ENDR
  1378.  
  1379. ;___________________________________________________________________________
  1380. ;
  1381.  
  1382. JDoEject          EQU         4*($F7)+$0400             ; Sony Driver jump vectors
  1383.  
  1384.  
  1385.                   ENDIF
  1386.  
  1387.     ENDIF    ; if not already included...